﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
    xmlns:ThemeOMANE="clr-namespace:OMANE.Common.UI.Theme" >

    <ThemeOMANE:TypeNameConverter x:Key="TypeNameConverter" />
    
    <Style x:Key="CustomHeaderStyle" TargetType="{x:Type GridViewColumnHeader}">
        <Setter Property="Background" Value="#FFCDE7F4"/>
        <Setter Property="Foreground" Value="#FF07034B"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFA1CCE0" Offset="0"/>
                    <GradientStop Color="#FFABD5EA" Offset="1.0"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ListViewOMANE_GroupItemStyle" TargetType="{x:Type GroupItem}">
        <Setter Property="Margin" Value="0,0,0,5"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GroupItem}">
                    <Expander IsExpanded="True" BorderBrush="#FFA4B97F" BorderThickness="0,0,0,1">
                        <Expander.Header>
                            <DockPanel>
                                <TextBlock FontWeight="Bold" 
                                           Text="{Binding Path=Name,Converter={StaticResource TypeNameConverter}}"
                                           Margin="5,0,0,0" 
                                           Width="100" />
                                <!--Converter={StaticResource TypeNameConverter}-->
                                <TextBlock FontWeight="Bold" 
                                           Text="{Binding Path=ItemCount}" />
                            </DockPanel>
                        </Expander.Header>
                        <Expander.Content>
                            <ItemsPresenter />
                        </Expander.Content>
                    </Expander>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <DataTemplate x:Key="LtvCorrespTemplate">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Button Background="ForestGreen" Width="20" Height="20" Margin="0" Grid.Column="0"/>
            <Button Background="Yellow" Width="20" Height="20" Margin="0" Grid.Column="1"/>
            <Button Background="Red" Width="20" Height="20" Margin="0" Grid.Column="2"/>
            <TextBlock VerticalAlignment="Center" Grid.Column="3" Text="{Binding Key}" />
            <TextBlock VerticalAlignment="Center" Grid.Column="4" Text="{Binding Value.chBDD.Nom}" />
        </Grid>
    </DataTemplate>
       
    
	<Style x:Key="BaseButtonStyle" TargetType="{x:Type ButtonBase}">
		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
		<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
		<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Padding" Value="1"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ButtonBase}">
					<Microsoft_Windows_Themes:ButtonChrome x:Name="Chrome" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderDefaulted="{TemplateBinding Button.IsDefaulted}" SnapsToDevicePixels="true">
						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
					</Microsoft_Windows_Themes:ButtonChrome>
					<ControlTemplate.Triggers> 
                        <Trigger>
							<Setter Property="RenderDefaulted" TargetName="Chrome" Value="true"/>
						</Trigger>
						<Trigger Property="ToggleButton.IsChecked" Value="true">
							<Setter Property="RenderPressed" TargetName="Chrome" Value="true"/>
						</Trigger>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="#ADADAD"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="RepeatButtonStyle1" BasedOn="{StaticResource BaseButtonStyle}" TargetType="{x:Type RepeatButton}">
		<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
		<Setter Property="Background">
			<Setter.Value>
				<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
					<GradientStop Color="#FFF3F3F3" Offset="0"/>
					<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
					<GradientStop Color="#FFDDDDDD" Offset="0.5"/>
					<GradientStop Color="#FFDC6F6F" Offset="1"/>
				</LinearGradientBrush>
			</Setter.Value>
		</Setter>
		
	</Style>
    
    
    
</ResourceDictionary>
